const bcrypt = require('bcrypt')
const User = require('../model/User')

async function verify(account, password) {
    let rePassword = (await User.findOne({
        where:{
            account:account
        }
    })).dataValues.password
    return bcrypt.compareSync(password, rePassword)
}

module.exports = verify